package com.indusfo.spc.mapper;

import com.indusfo.spc.pojo.MatRepairDete;
import com.indusfo.spc.pojo.OrderRepairDete;
import com.indusfo.spc.pojo.OrderRepairDete;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author liub
 * @Date 2019/11/27 14:24
 * @Version 1.0
 */

public interface OrderRepairDeteMapper {
    /**
     * 新增
     */
    int insertOrderRepairDete(OrderRepairDete orderRepairDete);

    /**
     * 修改
     */
    int updateOrderRepairDete(OrderRepairDete orderRepairDete);

    /**
     * 查询
     */
    List<OrderRepairDete> queryOrderRepairDete(OrderRepairDete orderRepairDete);

    /**
     * 总数
     */
    int countOrderRepairDete(OrderRepairDete orderRepairDete);

    /**
     * 判重
     */
    int checkOrderRepairDete(OrderRepairDete orderRepairDete);

    /**
     * 启停
     */
    int deleteOrderRepairDete(@Param("orderRepairDeteIds") List<Integer> orderRepairDeteIds, @Param("dataState") Integer dataState);

    /**
     * 级联删除查询
     */
    List<OrderRepairDete> queryOrderRepairDeteByOrderRepairId(@Param("orderRepairId") Integer orderRepairId);

    /**
     * 级联删除修改
     */
    int deleteOrderRepairDeteByOrderRepairDeteId(@Param("orderRepairDeteId") Integer orderRepairDeteId, @Param("dataState") Integer dataState);

    int insertOrderRepairDeteByMatRepairDeteList(@Param("matRepairDeteList") List<MatRepairDete> matRepairDeteList);

}